import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;

public class Main01Java {

    final String str = "这是一个string";
    int a = 12;
    static String name = "lc";
    static String toString = "Hello," + name + '!';
    PersonJ personJ = new PersonJ("lc", false);

    public static void main(String[] args) {
        System.out.println("Hello,world");
        System.out.println(max(1, 2));
        System.out.println(toString);
    }

    public static int max(int a, int b) {
        if (a > b) {
            return a;
        } else {
            return b;
        }
    }

    public String getColorString(Color color) {
        String str = null;

        Animal a = new Dog();
        if (a instanceof Dog) {
            ((Dog) a).dig();
        }


        switch (color) {
            case RED:
            case ORANGE:
            case YELLOW:
                str = "warm";
                break;
            case GREEN:
                str = "neutral";
                break;
            case BLUE:
                str = "cold";
                break;
            default:
                break;
        }
        return str;
    }


}

class Animal {

}

class Dog extends Animal {
    public void dig() {
        System.out.println("狗在叫");




        Map<Character, String> binaryReps = new TreeMap();
        ArrayList<Character> charList = new ArrayList();
        charList.add('A');
        charList.add('B');
        charList.add('C');
        charList.add('D');
        charList.add('E');
        charList.add('F');

        for (int i = 0; i < charList.size(); i++) {
            String binary = Integer.toBinaryString(charList.get(i));
            binaryReps.put(charList.get(i), binary);
        }

    }
}

